// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/libs/request';

/**
 * @description 列表
 * @param {Object} param data {Object} 传值参数
 */
export function ListApi(data) {
  return request({
    url: 'cate/list',
    method: 'get',
    params: data,
  });
}
/**
 * @description 上级列表
 * @param {Object} param data {Object} 传值参数
 */
export function ListCateApi() {
  return request({
    url: 'cate/cate',
    method: 'get',
    params: {},
  });
}

/**
 * @description 获取多个分类
 * @param {Object} param data {Object} 传值对象
 */
export function listCatesApi(data) {
  return request({
    url: `cate/cates`,
    method: 'post',
    data,
  });
}

/**
 * @description 保存
 * @param {Object} param data {Object} 传值对象
 */
export function saveApi(data) {
  return request({
    url: `cate/save`,
    method: 'post',
    data,
  });
}